package system.model.converter;

import common.model.po.SysRole;
import system.model.request.SaveRoleRequest;

/**
 * 在此填写类的用途、注意事项等
 *
 * @author 米泽鹏
 * @since 2021-08-08 下午 8:41
 */
public class SysRoleConverter {

	public static SysRole saveRequestToPo(SaveRoleRequest saveRoleRequest) {
		if (saveRoleRequest == null) {
			return null;
		}
		SysRole sysRole = new SysRole();
		sysRole.setRoleCode(saveRoleRequest.getRoleCode());
		sysRole.setRoleName(saveRoleRequest.getRoleName());
		sysRole.setIsAdmin(saveRoleRequest.getIsAdmin());
		sysRole.setDescription(saveRoleRequest.getDescription());
		sysRole.setId(saveRoleRequest.getId());
		return sysRole;
	}

}
